package com.exam.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="exam_grade")
public class ExamGrade implements Serializable{
	
	private static final long serialVersionUID = 8235346920862638733L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY,generator = "persistenceGenerator")
	@GenericGenerator(name="persistenceGenerator",strategy = "native")
	@Column(name="exam_grade_id",length=5)
	private Integer examGradeId;
	
	@Column(name="exam_stu_id",length=10)
	private Integer examStuId;
	
	@Column(name="exam_subject_id",length=5)
	private Integer examSubjectId;
	
	@Column(name="exam_grade_point",length=5)
	private Integer examGradePoint;
	
	@Column(name="exam_grade_right",length=5)
	private Integer examGradeRight;
	
	@Column(name="exam_grade_sum",length=5)
	private Integer examGradeSum;
	
	@Column(name="exam_grade_time",nullable=false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date examGradeTime;
	
	@Column(name="exam_grade_flag",length=5)
	private Integer examGradeFlag;

	public Integer getExamGradeId() {
		return examGradeId;
	}

	public void setExamGradeId(Integer examGradeId) {
		this.examGradeId = examGradeId;
	}

	public Integer getExamStuId() {
		return examStuId;
	}

	public void setExamStuId(Integer examStuId) {
		this.examStuId = examStuId;
	}

	public Integer getExamSubjectId() {
		return examSubjectId;
	}

	public void setExamSubjectId(Integer examSubjectId) {
		this.examSubjectId = examSubjectId;
	}

	public Integer getExamGradePoint() {
		return examGradePoint;
	}

	public void setExamGradePoint(Integer examGradePoint) {
		this.examGradePoint = examGradePoint;
	}

	public Integer getExamGradeRight() {
		return examGradeRight;
	}

	public void setExamGradeRight(Integer examGradeRight) {
		this.examGradeRight = examGradeRight;
	}

	public Integer getExamGradeSum() {
		return examGradeSum;
	}

	public void setExamGradeSum(Integer examGradeSum) {
		this.examGradeSum = examGradeSum;
	}

	

	public Date getExamGradeTime() {
		return examGradeTime;
	}

	public void setExamGradeTime(Date examGradeTime) {
		this.examGradeTime = examGradeTime;
	}

	public Integer getExamGradeFlag() {
		return examGradeFlag;
	}

	public void setExamGradeFlag(Integer examGradeFlag) {
		this.examGradeFlag = examGradeFlag;
	}


	public ExamGrade(Integer examGradeId, Integer examStuId, Integer examSubjectId, Integer examGradePoint, Integer examGradeRight,
			Integer examGradeSum, Date examGradeTime, Integer examGradeFlag) {
		super();
		this.examGradeId = examGradeId;
		this.examStuId = examStuId;
		this.examSubjectId = examSubjectId;
		this.examGradePoint = examGradePoint;
		this.examGradeRight = examGradeRight;
		this.examGradeSum = examGradeSum;
		this.examGradeTime = examGradeTime;
		this.examGradeFlag = examGradeFlag;
	}

	public ExamGrade() {
		super();
	}
	
	
}
